<template>
  <div class="home">
    <JsonExcel
      class="export-excel-wrapper"
      :data="json_data"
      :fields="json_fields"
      type="xls"
      worksheet="My Worksheet"
      :name="name"
    >
      <el-button icon="el-icon-download" size="mini">导出</el-button>
    </JsonExcel>
  </div>
</template>

<script>
import JsonExcel from "vue-json-excel";
export default {
  components: {
    JsonExcel,
  },
  name: "downLoadExcel",
  props: {
    json_fields: {
      type: Object,
      default: "",
    },
    json_data: {
      type: Array,
      default: [],
    },
    name: {
      type: String,
      default: "",
    },
  },
};
</script>

<style>
</style>